Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cronjob for readreplica rotator #2242

Merged
merged 47 commits into from
Dec 6, 2023
Merged

Add cronjob for readreplica rotator #2242

merged 47 commits into from
Dec 6, 2023

Conversation

ykadowak
Copy link
Contributor

@ykadowak ykadowak commented Nov 27, 2023

Description:

Add docker image and cronjob helm template for #2241.

To add e2e tests for this, read replica deployment helm template is required. I'll do this in another PR.

Related Issue:

Versions:

  • Go Version: 1.21.3
  • Docker Version: 20.10.8
  • Kubernetes Version: v1.28.2
  • NGT Version: 2.1.3

Checklist:

Special notes for your reviewer:

@vdaas-ci
Copy link
Collaborator

[WARNING:INTCFG] Changes in interal/config may require you to change Helm charts. Please check.

@github-actions github-actions bot added the team/set SET team label Nov 27, 2023
@github-actions github-actions bot added size/XXL and removed size/XXL labels Dec 5, 2023
@ykadowak ykadowak requested a review from vankichi December 5, 2023 08:46
@@ -0,0 +1,59 @@
#
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please also add NetworkPolicy resource?? 🙏

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for pointing out.
6544457

@github-actions github-actions bot added size/XXL and removed size/XXL labels Dec 6, 2023
@ykadowak ykadowak requested a review from hlts2 December 6, 2023 02:35
@github-actions github-actions bot added size/XXL and removed size/XXL labels Dec 6, 2023
vankichi
vankichi previously approved these changes Dec 6, 2023
hlts2
hlts2 previously approved these changes Dec 6, 2023
Copy link
Collaborator

@hlts2 hlts2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ykadowak ykadowak dismissed stale reviews from hlts2 and vankichi via 5c480d7 December 6, 2023 06:52
@ykadowak ykadowak requested review from vankichi and hlts2 December 6, 2023 06:52
Copy link
Collaborator

@hlts2 hlts2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@github-actions github-actions bot removed the size/XXL label Dec 6, 2023
@vankichi vankichi merged commit 4fddfb0 into main Dec 6, 2023
50 of 51 checks passed
@vankichi vankichi deleted the feature/readreplica/job branch December 6, 2023 07:52
kmrmt pushed a commit that referenced this pull request Dec 12, 2023
* Implement sample read replica rotation logic

* Add external-snapshotter in go.mod

* Add readreplica initial implementation

* Add service implementation of readreplica rotator

* Add readreplica rotate config

* Refactor to read labels

* replace id to _MY_TARGET_REPLICA_ID_

* Add snapshot k8s client

* Format

* Fix snapshot client initialization

* Add Apache License to main.go

* Use GetConfigOrDie

* Use internal/k8s client

* Refactor

* Use controller-runtime for CRUD in readreplica

* Remove snapshot client and use controller-runtime

* Move LabelSelector into internal/k8s

* Report error to span

* Update go modules

* Remove old example

* Refactor

* Disable exhaustruct for now

* Fix predeclared

* Fix stylecheck

* nolint:gomnd

* Add test template

* Add test for getNewBaseName

* Add readreplica-rotate build scripts

* Add service account and clusterroles for read replica rotator

* Update charts

* Update comment

* update charts

* Update docker image name in Makefile.d/docker.mk

* Fix scheme

* Update docs

* Fix comment

* style: format code with Gofumpt and Prettier

This commit fixes the style issues introduced in 6dba952 according to the output
from Gofumpt and Prettier.

Details: #2242

* Fix indent

* Add network policy for readreplica rotator

* Update README.md

---------

Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants